/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package auxClasses;

/**
 *
 * @author Thiago
 */
public class CharType {
    private int letterPosition = -1;
    private int consecutiveChars = 0;
    private int totalChars = 0;
    private boolean isSpecial = false;
    
    public CharType(){
        
    }
    
    public CharType(boolean isSpecial){
        this.isSpecial = isSpecial;
    }
    
    public void reset(){
        letterPosition = -1;
        consecutiveChars = 0;
        totalChars = 0;
    }
    
    public static CharacterType getType(char c){
        if(Character.isLetter(c)){
            if(Character.isUpperCase(c)){
                return CharacterType.UPPER;
            } else {
                return CharacterType.LOWER;
            }
        } else if(Character.isDigit(c)){
            return CharacterType.DIGIT;
        }
        return CharacterType.SYMBOL;
    }

    public boolean isSpecial() {
        return isSpecial;
    }

    public void setIsSpecial(boolean isSpecial) {
        this.isSpecial = isSpecial;
    }

    public int getConsecutiveChars() {
        return consecutiveChars;
    }

    public void setConsecutiveChars(int consecutiveChars) {
        this.consecutiveChars = consecutiveChars;
    }

    public int getLetterPosition() {
        return letterPosition;
    }

    public void setLetterPosition(int letterPosition) {
        this.letterPosition = letterPosition;
    }

    public int getTotalChars() {
        return totalChars;
    }

    public void setTotalChars(int totalChars) {
        this.totalChars = totalChars;
    }
}